\(\int \frac {x^9}{1+3 x^4+x^8} \, dx\) [369]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 90 \[ \int \frac {x^9}{1+3 x^4+x^8} \, dx=\frac {x^2}{2}-\frac {1}{2} \sqrt {\frac {1}{5} \left (9+4 \sqrt {5}\right )} \arctan \left (\sqrt {\frac {2}{3+\sqrt {5}}} x^2\right )+\frac {1}{2} \sqrt {\frac {1}{5} \left (9-4 \sqrt {5}\right )} \arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x^2\right ) \]

[Out]

1/2*x^2+1/2*arctan(x^2*(1/2+1/2*5^(1/2)))*(1-2/5*5^(1/2))-1/2*arctan(x^2*2^(1/2)/(3+5^(1/2))^(1/2))*(1+2/5*5^(
1/2))

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1373, 1136, 1180, 209} \[ \int \frac {x^9}{1+3 x^4+x^8} \, dx=-\frac {1}{2} \sqrt {\frac {1}{5} \left (9+4 \sqrt {5}\right )} \arctan \left (\sqrt {\frac {2}{3+\sqrt {5}}} x^2\right )+\frac {1}{2} \sqrt {\frac {1}{5} \left (9-4 \sqrt {5}\right )} \arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x^2\right )+\frac {x^2}{2} \]

[In]

Int[x^9/(1 + 3*x^4 + x^8),x]

[Out]

x^2/2 - (Sqrt[(9 + 4*Sqrt[5])/5]*ArcTan[Sqrt[2/(3 + Sqrt[5])]*x^2])/2 + (Sqrt[(9 - 4*Sqrt[5])/5]*ArcTan[Sqrt[(
3 + Sqrt[5])/2]*x^2])/2

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1136

Int[((d_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[d^3*(d*x)^(m - 3)*((a + b*
x^2 + c*x^4)^(p + 1)/(c*(m + 4*p + 1))), x] - Dist[d^4/(c*(m + 4*p + 1)), Int[(d*x)^(m - 4)*Simp[a*(m - 3) + b
*(m + 2*p - 1)*x^2, x]*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b^2 - 4*a*c, 0] && Gt
Q[m, 3] && NeQ[m + 4*p + 1, 0] && IntegerQ[2*p] && (IntegerQ[p] || IntegerQ[m])

Rule 1180

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 1373

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = GCD[m + 1, n]}, Dist[
1/k, Subst[Int[x^((m + 1)/k - 1)*(a + b*x^(n/k) + c*x^(2*(n/k)))^p, x], x, x^k], x] /; k != 1] /; FreeQ[{a, b,
 c, p}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IGtQ[n, 0] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \frac {x^4}{1+3 x^2+x^4} \, dx,x,x^2\right ) \\ & = \frac {x^2}{2}-\frac {1}{2} \text {Subst}\left (\int \frac {1+3 x^2}{1+3 x^2+x^4} \, dx,x,x^2\right ) \\ & = \frac {x^2}{2}-\frac {1}{20} \left (15-7 \sqrt {5}\right ) \text {Subst}\left (\int \frac {1}{\frac {3}{2}-\frac {\sqrt {5}}{2}+x^2} \, dx,x,x^2\right )-\frac {1}{20} \left (15+7 \sqrt {5}\right ) \text {Subst}\left (\int \frac {1}{\frac {3}{2}+\frac {\sqrt {5}}{2}+x^2} \, dx,x,x^2\right ) \\ & = \frac {x^2}{2}-\frac {1}{2} \sqrt {\frac {1}{5} \left (9+4 \sqrt {5}\right )} \tan ^{-1}\left (\sqrt {\frac {2}{3+\sqrt {5}}} x^2\right )+\frac {1}{20} \sqrt {180-80 \sqrt {5}} \tan ^{-1}\left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x^2\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.08 \[ \int \frac {x^9}{1+3 x^4+x^8} \, dx=\frac {1}{40} \left (20 x^2-\sqrt {6-2 \sqrt {5}} \left (15+7 \sqrt {5}\right ) \arctan \left (\sqrt {\frac {2}{3+\sqrt {5}}} x^2\right )+\sqrt {2 \left (3+\sqrt {5}\right )} \left (-15+7 \sqrt {5}\right ) \arctan \left (\sqrt {\frac {1}{2} \left (3+\sqrt {5}\right )} x^2\right )\right ) \]

[In]

Integrate[x^9/(1 + 3*x^4 + x^8),x]

[Out]

(20*x^2 - Sqrt[6 - 2*Sqrt[5]]*(15 + 7*Sqrt[5])*ArcTan[Sqrt[2/(3 + Sqrt[5])]*x^2] + Sqrt[2*(3 + Sqrt[5])]*(-15
+ 7*Sqrt[5])*ArcTan[Sqrt[(3 + Sqrt[5])/2]*x^2])/40

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.10 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.47

method result size
risch \(\frac {x^{2}}{2}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (25 \textit {\_Z}^{4}+90 \textit {\_Z}^{2}+1\right )}{\sum }\textit {\_R} \ln \left (15 \textit {\_R}^{3}+8 x^{2}+47 \textit {\_R} \right )\right )}{4}\) \(42\)
default \(\frac {x^{2}}{2}-\frac {\left (7+3 \sqrt {5}\right ) \sqrt {5}\, \arctan \left (\frac {4 x^{2}}{2 \sqrt {5}+2}\right )}{5 \left (2 \sqrt {5}+2\right )}-\frac {\left (-7+3 \sqrt {5}\right ) \sqrt {5}\, \arctan \left (\frac {4 x^{2}}{2 \sqrt {5}-2}\right )}{5 \left (2 \sqrt {5}-2\right )}\) \(79\)

[In]

int(x^9/(x^8+3*x^4+1),x,method=_RETURNVERBOSE)

[Out]

1/2*x^2+1/4*sum(_R*ln(15*_R^3+8*x^2+47*_R),_R=RootOf(25*_Z^4+90*_Z^2+1))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 152 vs. \(2 (50) = 100\).

Time = 0.27 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.69 \[ \int \frac {x^9}{1+3 x^4+x^8} \, dx=\frac {1}{2} \, x^{2} + \frac {1}{20} \, \sqrt {5} \sqrt {4 \, \sqrt {5} - 9} \log \left (2 \, x^{2} + \sqrt {4 \, \sqrt {5} - 9} {\left (\sqrt {5} + 3\right )}\right ) - \frac {1}{20} \, \sqrt {5} \sqrt {4 \, \sqrt {5} - 9} \log \left (2 \, x^{2} - \sqrt {4 \, \sqrt {5} - 9} {\left (\sqrt {5} + 3\right )}\right ) + \frac {1}{20} \, \sqrt {5} \sqrt {-4 \, \sqrt {5} - 9} \log \left (2 \, x^{2} + {\left (\sqrt {5} - 3\right )} \sqrt {-4 \, \sqrt {5} - 9}\right ) - \frac {1}{20} \, \sqrt {5} \sqrt {-4 \, \sqrt {5} - 9} \log \left (2 \, x^{2} - {\left (\sqrt {5} - 3\right )} \sqrt {-4 \, \sqrt {5} - 9}\right ) \]

[In]

integrate(x^9/(x^8+3*x^4+1),x, algorithm="fricas")

[Out]

1/2*x^2 + 1/20*sqrt(5)*sqrt(4*sqrt(5) - 9)*log(2*x^2 + sqrt(4*sqrt(5) - 9)*(sqrt(5) + 3)) - 1/20*sqrt(5)*sqrt(
4*sqrt(5) - 9)*log(2*x^2 - sqrt(4*sqrt(5) - 9)*(sqrt(5) + 3)) + 1/20*sqrt(5)*sqrt(-4*sqrt(5) - 9)*log(2*x^2 +
(sqrt(5) - 3)*sqrt(-4*sqrt(5) - 9)) - 1/20*sqrt(5)*sqrt(-4*sqrt(5) - 9)*log(2*x^2 - (sqrt(5) - 3)*sqrt(-4*sqrt
(5) - 9))

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.60 \[ \int \frac {x^9}{1+3 x^4+x^8} \, dx=\frac {x^{2}}{2} + 2 \cdot \left (\frac {1}{4} - \frac {\sqrt {5}}{10}\right ) \operatorname {atan}{\left (\frac {2 x^{2}}{-1 + \sqrt {5}} \right )} - 2 \left (\frac {\sqrt {5}}{10} + \frac {1}{4}\right ) \operatorname {atan}{\left (\frac {2 x^{2}}{1 + \sqrt {5}} \right )} \]

[In]

integrate(x**9/(x**8+3*x**4+1),x)

[Out]

x**2/2 + 2*(1/4 - sqrt(5)/10)*atan(2*x**2/(-1 + sqrt(5))) - 2*(sqrt(5)/10 + 1/4)*atan(2*x**2/(1 + sqrt(5)))

Maxima [F]

\[ \int \frac {x^9}{1+3 x^4+x^8} \, dx=\int { \frac {x^{9}}{x^{8} + 3 \, x^{4} + 1} \,d x } \]

[In]

integrate(x^9/(x^8+3*x^4+1),x, algorithm="maxima")

[Out]

1/2*x^2 - integrate((3*x^4 + 1)*x/(x^8 + 3*x^4 + 1), x)

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.73 \[ \int \frac {x^9}{1+3 x^4+x^8} \, dx=\frac {1}{2} \, x^{2} - \frac {1}{20} \, {\left (3 \, x^{4} {\left (\sqrt {5} - 5\right )} + \sqrt {5} - 5\right )} \arctan \left (\frac {2 \, x^{2}}{\sqrt {5} + 1}\right ) - \frac {1}{20} \, {\left (3 \, x^{4} {\left (\sqrt {5} + 5\right )} + \sqrt {5} + 5\right )} \arctan \left (\frac {2 \, x^{2}}{\sqrt {5} - 1}\right ) \]

[In]

integrate(x^9/(x^8+3*x^4+1),x, algorithm="giac")

[Out]

1/2*x^2 - 1/20*(3*x^4*(sqrt(5) - 5) + sqrt(5) - 5)*arctan(2*x^2/(sqrt(5) + 1)) - 1/20*(3*x^4*(sqrt(5) + 5) + s
qrt(5) + 5)*arctan(2*x^2/(sqrt(5) - 1))

Mupad [B] (verification not implemented)

Time = 8.39 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.44 \[ \int \frac {x^9}{1+3 x^4+x^8} \, dx=2\,\mathrm {atanh}\left (\frac {1280\,x^2\,\sqrt {\frac {\sqrt {5}}{20}-\frac {9}{80}}}{64\,\sqrt {5}-192}+\frac {768\,\sqrt {5}\,x^2\,\sqrt {\frac {\sqrt {5}}{20}-\frac {9}{80}}}{64\,\sqrt {5}-192}\right )\,\sqrt {\frac {\sqrt {5}}{20}-\frac {9}{80}}-2\,\mathrm {atanh}\left (\frac {1280\,x^2\,\sqrt {-\frac {\sqrt {5}}{20}-\frac {9}{80}}}{64\,\sqrt {5}+192}-\frac {768\,\sqrt {5}\,x^2\,\sqrt {-\frac {\sqrt {5}}{20}-\frac {9}{80}}}{64\,\sqrt {5}+192}\right )\,\sqrt {-\frac {\sqrt {5}}{20}-\frac {9}{80}}+\frac {x^2}{2} \]

[In]

int(x^9/(3*x^4 + x^8 + 1),x)

[Out]

2*atanh((1280*x^2*(5^(1/2)/20 - 9/80)^(1/2))/(64*5^(1/2) - 192) + (768*5^(1/2)*x^2*(5^(1/2)/20 - 9/80)^(1/2))/
(64*5^(1/2) - 192))*(5^(1/2)/20 - 9/80)^(1/2) - 2*atanh((1280*x^2*(- 5^(1/2)/20 - 9/80)^(1/2))/(64*5^(1/2) + 1
92) - (768*5^(1/2)*x^2*(- 5^(1/2)/20 - 9/80)^(1/2))/(64*5^(1/2) + 192))*(- 5^(1/2)/20 - 9/80)^(1/2) + x^2/2